--天堂支点
local tiantangzhidian = fk.CreateSkill {
    name = "mcdh_tiantangzhidian",
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

tiantangzhidian:addEffect('viewas',{
    pattern = "god_salvation",
    card_filter = function(self,player, to_select, selected)
        return #selected == 0 and Fk:getCardById(to_select).suit == Card.Heart
    end,
    view_as = function(self,player, cards)
        if #cards ~= 1  then return end
        local card = Fk:cloneCard("god_salvation")
        card.skillName = self.name
        card:addSubcard(cards[1])
        return card
    end,
    enabled_at_play = function(self, player)
        return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
    end,
})

Fk:loadTranslationTable{
    ["mcdh_tiantangzhidian"] = "天堂支点",
    [":mcdh_tiantangzhidian"] = "出牌阶段限一次，你可以将一张 ♥ 牌当【桃园结义】使用。",
}
return tiantangzhidian